package nancal.mp.feign

import nancal.mp.db.mongo.AuthResourceConflictPolicyEnum
import nancal.mp.db.mongo.ResourceTypeEnum
import nbcp.base.annotation.Require
import nbcp.base.comm.ListResult
import org.springframework.cloud.openfeign.FeignClient
import org.springframework.web.bind.annotation.PostMapping
import org.springframework.web.bind.annotation.RequestParam

@FeignClient(name = "mp-oauth-api")
interface IamClient {

    @PostMapping("/oauth/my-deny-resources")
    fun myDenyAuths(
        @RequestParam @Require appCode: String,
        @RequestParam @Require resourceType: ResourceTypeEnum,
        @RequestParam @Require policy: AuthResourceConflictPolicyEnum
    ): ListResult<String>
}